package com.cangxuan.blockchain.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时获取区块链地址
 * author:何程城
 */
@Slf4j
@Component
@EnableScheduling
public class GetBlockChainScheduled {


    // @Value("${blockchainTotal}")
    // private int BLOCK_CHAIN_TOTAL;
    //
    // @Value("${loadFactor}")
    // private  float LOAD_FACTOR;
    //
    // IBlockChainDao blockChainDao;

    // @Autowired
    // public void setBlockChainDao(IBlockChainDao blockChainDao) {
    //     this.blockChainDao = blockChainDao;
    // }
    //
    // @Scheduled(fixedDelay = 3000)
    // public void getBlockChainAddress(){
    //     blockChainDao.insertBcAddress("xsssdfasdfadf");
    //     //查询数据库中区块链地址数量
    //     // System.out.println("一分钟过去了");
    //     // System.out.println(BASE_BLOCK_CHAIN_PATH);
    //     // System.out.println(BLOCK_CHAIN_TOTAL);
    //     // System.out.println(LOAD_FACTOR);
    //     // System.out.println("阈值：" +BLOCK_CHAIN_TOTAL * LOAD_FACTOR);
    // }

}
